library ieee;
use ieee.std_logic_1164.ALL;
use ieee.numeric_std.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use work.game_logic_pkg.all;

entity game_vga is
   port ( 
			clk50 : in  STD_LOGIC;	-- Clk in 
			reset : in std_logic;	-- Reset the board
			red : out  STD_LOGIC_VECTOR(2 downto 0);
			green : out  STD_LOGIC_VECTOR(2 downto 0);
			blue : out  STD_LOGIC_VECTOR(1 downto 0);
			hs : out  STD_LOGIC;
			vs : out  STD_LOGIC;			
			
			-- Input from the game logic componenet
			game_board : in g_board;
			done : in std_logic;
			valid_move : in std_logic;
			player : in std_logic
			
		  );
end game_vga;

architecture Structural of game_vga is
	signal horz_count: STD_LOGIC_VECTOR (9 downto 0);	-- Horizontal Scan line
	signal vert_count: STD_LOGIC_VECTOR (9 downto 0);   -- Vertical Scan line
	signal vinc_flag: STD_LOGIC;								-- Verticle Increment Flag

	signal count : unsigned(0 downto 0);					-- Count to Make 25 MHz Clock
	signal clk_en : std_logic;									-- clock enable

begin
	-- Create 25 MHz clock
	process(clk50, reset)
		variable temp : std_logic_vector(0 downto 0);
	begin
		if(reset = '1') then
			count <= "0";
			clk_en <= '0';
		elsif clk50 = '1' and clk50'Event then
			count <= count + 1;
			temp := std_logic_vector(count);
			-- Count 0 then 1, if 1 then clock enable to halve the 50 MHz Clock
			if(temp = "1") then
				clk_en <= '1';
			else
				clk_en <= '0';
			end if;
		end if;
	end process;

	-- Write The RGB Output
	process(clk50,reset)
	begin
		-- Reset Scanning logic if reset
		if(reset = '1') then
			green <= "000";
			blue <="00";
			red <= "000";
			horz_count <= (others => '0');
		elsif( rising_edge(clk50)) then
		if clk_en = '1' then	
			-- Count from 0 to 800 for the horizonal scan
			-- 800 pixels decimal
			if horz_count = "1100100000" then
				-- Roll over back to 0 if at 800 pixels
				horz_count <= "0000000000";    -- pixel 0
			else
				----------------------------------------
				-- BLUE OUTPUT
				----------------------------------------
				
				-- Take input from game logic and see where the WHITE pieces are
				-- the WHITE output is translated to blue on the screen here
				if    horz_count >= 160 and horz_count <= 211 and vert_count >= 49 and vert_count <= 79 and game_board(7,7) = WHITE then blue <= "11"; -- Block (7,7)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 49 and vert_count <= 79 and game_board(6,7) = WHITE then blue <= "11"; -- Block (6,7)  
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 49 and vert_count <= 79 and game_board(5,7) = WHITE then blue <= "11"; -- Block (5,7)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 49 and vert_count <= 79 and game_board(4,7) = WHITE then blue <= "11"; -- Block (4,7)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 49 and vert_count <= 79 and game_board(3,7) = WHITE then blue <= "11"; -- Block (3,7)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 49 and vert_count <= 79 and game_board(2,7) = WHITE then blue <= "11"; -- Block (2,7)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 49 and vert_count <= 79 and game_board(1,7) = WHITE then blue <= "11"; -- Block (1,7)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 49 and vert_count <= 79 and game_board(0,7) = WHITE then blue <= "11"; -- Block (0,7) 
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 96 and vert_count <= 126 and game_board(7,6) = WHITE then blue <= "11"; -- Block (7,6)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 96 and vert_count <= 126 and game_board(6,6) = WHITE then blue <= "11"; -- Block (6,6)  
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 96 and vert_count <= 126 and game_board(5,6) = WHITE then blue <= "11"; -- Block (5,6)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 96 and vert_count <= 126 and game_board(4,6) = WHITE then blue <= "11"; -- Block (4,6)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 96 and vert_count <= 126 and game_board(3,6) = WHITE then blue <= "11"; -- Block (3,6)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 96 and vert_count <= 126 and game_board(2,6) = WHITE then blue <= "11"; -- Block (2,6)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 96 and vert_count <= 126 and game_board(1,6) = WHITE then blue <= "11"; -- Block (1,6)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 96 and vert_count <= 126 and game_board(0,6) = WHITE then blue <= "11"; -- Block (0,6)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 147 and vert_count <= 177 and game_board(7,5) = WHITE then blue <= "11"; -- Block (7,5)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 147 and vert_count <= 177 and game_board(6,5) = WHITE then blue <= "11"; -- Block (6,5) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 147 and vert_count <= 177 and game_board(5,5) = WHITE then blue <= "11"; -- Block (5,5)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 147 and vert_count <= 177 and game_board(4,5) = WHITE then blue <= "11"; -- Block (4,5)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 147 and vert_count <= 177 and game_board(3,5) = WHITE then blue <= "11"; -- Block (3,5)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 147 and vert_count <= 177 and game_board(2,5) = WHITE then blue <= "11"; -- Block (2,5)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 147 and vert_count <= 177 and game_board(1,5) = WHITE then blue <= "11"; -- Block (1,5)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 147 and vert_count <= 177 and game_board(0,5) = WHITE then blue <= "11"; -- Block (0,5)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 198 and vert_count <= 228 and game_board(7,4) = WHITE  then blue <= "11"; -- Block (7,4)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 198 and vert_count <= 228 and game_board(6,4) = WHITE then blue <= "11"; -- Block (6,4) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 198 and vert_count <= 228 and game_board(5,4) = WHITE then blue <= "11"; -- Block (5,4)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 198 and vert_count <= 228 and game_board(4,4) = WHITE then blue <= "11"; -- Block (4,4)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 198 and vert_count <= 228 and game_board(3,4) = WHITE then blue <= "11"; -- Block (3,4)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 198 and vert_count <= 228 and game_board(2,4) = WHITE then blue <= "11"; -- Block (2,4)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 198 and vert_count <= 228 and game_board(1,4) = WHITE then blue <= "11"; -- Block (1,4)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 198 and vert_count <= 228 and game_board(0,4) = WHITE then blue <= "11"; -- Block (0,4)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 249 and vert_count <= 279 and game_board(7,3) = WHITE then blue <= "11"; -- Block (7,3)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 249 and vert_count <= 279 and game_board(6,3) = WHITE then blue <= "11"; -- Block (6,3)
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 249 and vert_count <= 279 and game_board(5,3) = WHITE then blue <= "11"; -- Block (5,3)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 249 and vert_count <= 279 and game_board(4,3) = WHITE then blue <= "11"; -- Block (4,3)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 249 and vert_count <= 279 and game_board(3,3) = WHITE then blue <= "11"; -- Block (3,3)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 249 and vert_count <= 279 and game_board(2,3) = WHITE then blue <= "11"; -- Block (2,3)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 249 and vert_count <= 279 and game_board(1,3) = WHITE then blue <= "11"; -- Block (1,3)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 249 and vert_count <= 279 and game_board(0,3) = WHITE then blue <= "11"; -- Block (0,3)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 300 and vert_count <= 330 and game_board(7,2) = WHITE then blue <= "11"; -- Block (7,2)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 300 and vert_count <= 330 and game_board(6,2) = WHITE then blue <= "11"; -- Block (6,2) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 300 and vert_count <= 330 and game_board(5,2) = WHITE then blue <= "11"; -- Block (5,2)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 300 and vert_count <= 330 and game_board(4,2) = WHITE then blue <= "11"; -- Block (4,2)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 300 and vert_count <= 330 and game_board(3,2) = WHITE then blue <= "11"; -- Block (3,2)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 300 and vert_count <= 330 and game_board(2,2) = WHITE then blue <= "11"; -- Block (2,2)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 300 and vert_count <= 330 and game_board(1,2) = WHITE then blue <= "11"; -- Block (1,2)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 300 and vert_count <= 330 and game_board(0,2) = WHITE then blue <= "11"; -- Block (0,2)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 351 and vert_count <= 381 and game_board(7,1) = WHITE then blue <= "11"; -- Block (7,1)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 351 and vert_count <= 381 and game_board(6,1) = WHITE then blue <= "11"; -- Block (6,1) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 351 and vert_count <= 381 and game_board(5,1) = WHITE then blue <= "11"; -- Block (5,1)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 351 and vert_count <= 381 and game_board(4,1) = WHITE then blue <= "11"; -- Block (4,1)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 351 and vert_count <= 381 and game_board(3,1) = WHITE then blue <= "11"; -- Block (3,1)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 351 and vert_count <= 381 and game_board(2,1) = WHITE then blue <= "11"; -- Block (2,1)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 351 and vert_count <= 381 and game_board(1,1) = WHITE then blue <= "11"; -- Block (1,1)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 351 and vert_count <= 381 and game_board(0,1) = WHITE then blue <= "11"; -- Block (0,1)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 402 and vert_count <= 432 and game_board(7,0) = WHITE then blue <= "11"; -- Block (7,0)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 402 and vert_count <= 432 and game_board(6,0) = WHITE then blue <= "11"; -- Block (6,0) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 402 and vert_count <= 432 and game_board(5,0) = WHITE then blue <= "11"; -- Block (5,0)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 402 and vert_count <= 432 and game_board(4,0) = WHITE then blue <= "11"; -- Block (4,0)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 402 and vert_count <= 432 and game_board(3,0) = WHITE then blue <= "11"; -- Block (3,0)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 402 and vert_count <= 432 and game_board(2,0) = WHITE then blue <= "11"; -- Block (2,0)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 402 and vert_count <= 432 and game_board(1,0) = WHITE then blue <= "11"; -- Block (1,0)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 402 and vert_count <= 432 and game_board(0,0) = WHITE then blue <= "11"; -- Block (0,0)		
			
			-- Display grid numbers
			-- Vert Number 7
				elsif vert_count >= 49 and vert_count <= 49 and horz_count >= 153 and horz_count <= 157 then blue <= "11";
				elsif vert_count >= 49 and vert_count <= 58 and horz_count >= 157 and horz_count <= 157 then blue <= "11";
			-- Vert Number 6
				elsif vert_count >= 96 and vert_count <= 104 and horz_count >= 153 and horz_count <= 153 then blue <= "11";
				elsif vert_count >= 100 and vert_count <= 104 and horz_count >= 157 and horz_count <= 157 then blue <= "11";
				elsif vert_count >= 100 and vert_count <= 100 and horz_count >= 153 and horz_count <= 157 then blue <= "11";
				elsif vert_count >= 104 and vert_count <= 104 and horz_count >= 153 and horz_count <= 157 then blue <= "11";
			-- Vert Number 5
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 147 and vert_count <= 147 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 151 and vert_count <= 151 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 155 and vert_count <= 155 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 147 and vert_count <= 151 then blue <= "11";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 151 and vert_count <= 155 then blue <= "11";
			-- Vert Number 4
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 198 and vert_count <= 202 then blue <= "11";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 198 and vert_count <= 207 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 202 and vert_count <= 202 then blue <= "11";
			-- Vert Number 3
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 249 and vert_count <= 249 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 253 and vert_count <= 253 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 257 and vert_count <= 257 then blue <= "11";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 249 and vert_count <= 257 then blue <= "11";
			-- Vert number 2
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 304 and vert_count <= 308 then blue <= "11";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 300 and vert_count <= 304 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 300 and vert_count <= 300 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 304 and vert_count <= 304 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 308 and vert_count <= 308 then blue <= "11";
			-- Vert number 1
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 351 and vert_count <= 359 then blue <= "11";
			-- Vert number 0
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 402 and vert_count <= 410 then blue <= "11";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 402 and vert_count <= 410 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 402 and vert_count <= 402 then blue <= "11";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 410 and vert_count <= 410 then blue <= "11";
			-- Horz 6				
				elsif horz_count >= 227 and horz_count <= 227 and vert_count >= 49 and vert_count <= 57 then blue <= "11";
				elsif horz_count >= 231 and horz_count <= 231 and vert_count >= 53 and vert_count <= 57 then blue <= "11";
				elsif horz_count >= 227 and horz_count <= 231 and vert_count >= 53 and vert_count <= 53 then blue <= "11";
				elsif horz_count >= 227 and horz_count <= 231 and vert_count >= 57 and vert_count <= 57 then blue <= "11";
			-- Horz 5
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 49 and vert_count <= 49 then blue <= "11";
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 53 and vert_count <= 53 then blue <= "11";
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 57 and vert_count <= 57 then blue <= "11";
				elsif horz_count >= 306 and horz_count <= 306 and vert_count >= 49 and vert_count <= 53 then blue <= "11";
				elsif horz_count >= 310 and horz_count <= 310 and vert_count >= 53 and vert_count <= 57 then blue <= "11";
			-- Horz number 4
				elsif horz_count >= 385 and horz_count <= 385 and vert_count >= 49 and vert_count <= 53 then blue <= "11";
				elsif horz_count >= 389 and horz_count <= 389 and vert_count >= 49 and vert_count <= 57 then blue <= "11";
				elsif horz_count >= 385 and horz_count <= 389 and vert_count >= 53 and vert_count <= 53 then blue <= "11";
			-- Horz number 3
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 49 and vert_count <= 49 then blue <= "11";
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 53 and vert_count <= 53 then blue <= "11";
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 57 and vert_count <= 57 then blue <= "11";
				elsif horz_count >= 468 and horz_count <= 468 and vert_count >= 49 and vert_count <= 57 then blue <= "11";
			-- Horz number 2
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 49 and vert_count <= 49 then blue <= "11";
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 53 and vert_count <= 53 then blue <= "11";
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 57 and vert_count <= 57 then blue <= "11";
				elsif horz_count >= 547 and horz_count <= 547 and vert_count >= 49 and vert_count <= 53 then blue <= "11";
				elsif horz_count >= 543 and horz_count <= 543 and vert_count >= 53 and vert_count <= 57 then blue <= "11";
			-- Horz number 1
				elsif horz_count >= 626 and horz_count <= 626 and vert_count >= 49 and vert_count <= 57 then blue <= "11";
			-- Horz number 0
				elsif horz_count >= 705 and horz_count <= 705 and vert_count >= 49 and vert_count <= 57 then blue <= "11";
				elsif horz_count >= 701 and horz_count <= 701 and vert_count >= 49 and vert_count <= 57 then blue <= "11";
				elsif horz_count >= 701 and horz_count <= 705 and vert_count >= 49 and vert_count <= 49 then blue <= "11";
				elsif horz_count >= 701 and horz_count <= 705 and vert_count >= 57 and vert_count <= 57 then blue <= "11";


				-------------------------------
				-- This displays the color block on Who's move it is
				-- if it is player 1 true move then blue is enabled
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 161 and horz_count <= 202 and player = '1' then blue <= "11";
				
			-- Letter T 
				elsif vert_count >= 468 and vert_count <= 469 and horz_count >= 206 and horz_count <= 221 then blue <= "11";
				elsif vert_count >= 470 and vert_count <= 506 and horz_count >= 213 and horz_count <= 214 then blue <= "11"; 
			-- Letter U	
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 224 and horz_count <= 225 then blue <= "11";			
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 233 and horz_count <= 234 then blue <= "11"; 
				elsif vert_count >= 505 and vert_count <= 506 and horz_count >= 226 and horz_count <= 232 then blue <= "11"; 
			-- Letter R 
				elsif vert_count >= 468 and vert_count <= 469 and horz_count >= 237 and horz_count <= 247 then blue <= "11";				
				elsif vert_count >= 478 and vert_count <= 479 and horz_count >= 237 and horz_count <= 247 then blue <= "11"; 
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 237 and horz_count <= 238 then blue <= "11"; 
				elsif vert_count >= 468 and vert_count <= 479 and horz_count >= 246 and horz_count <= 247 then blue <= "11"; 
				elsif vert_count >= 481 and vert_count <= 483 and horz_count >= 239 and horz_count <= 239 then blue <= "11";
				elsif vert_count >= 482 and vert_count <= 484 and horz_count >= 240 and horz_count <= 240 then blue <= "11"; 
				elsif vert_count >= 484 and vert_count <= 487 and horz_count >= 241 and horz_count <= 241 then blue <= "11"; 
				elsif vert_count >= 486 and vert_count <= 489 and horz_count >= 242 and horz_count <= 242 then blue <= "11";
				elsif vert_count >= 488 and vert_count <= 491 and horz_count >= 243 and horz_count <= 243 then blue <= "11";
				elsif vert_count >= 490 and vert_count <= 493 and horz_count >= 244 and horz_count <= 244 then blue <= "11";
				elsif vert_count >= 492 and vert_count <= 495 and horz_count >= 245 and horz_count <= 245 then blue <= "11";
				elsif vert_count >= 494 and vert_count <= 498 and horz_count >= 246 and horz_count <= 246 then blue <= "11";
				elsif vert_count >= 496 and vert_count <= 501 and horz_count >= 247 and horz_count <= 247 then blue <= "11";
				elsif vert_count >= 499 and vert_count <= 503 and horz_count >= 248 and horz_count <= 248 then blue <= "11";
				elsif vert_count >= 501 and vert_count <= 507 and horz_count >= 249 and horz_count <= 249 then blue <= "11";
				elsif vert_count >= 504 and vert_count <= 507 and horz_count >= 250 and horz_count <= 250 then blue <= "11";
			-- Letter N 
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 253 and horz_count <= 254 then blue <= "11";
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 262 and horz_count <= 263 then blue <= "11";
				elsif vert_count >= 469 and vert_count <= 475 and horz_count >= 255 and horz_count <= 255 then blue <= "11";
				elsif vert_count >= 472 and vert_count <= 482 and horz_count >= 256 and horz_count <= 256 then blue <= "11";
				elsif vert_count >= 477 and vert_count <= 487 and horz_count >= 257 and horz_count <= 257 then blue <= "11";
				elsif vert_count >= 484 and vert_count <= 493 and horz_count >= 258 and horz_count <= 258 then blue <= "11";
				elsif vert_count >= 490 and vert_count <= 497 and horz_count >= 259 and horz_count <= 259 then blue <= "11";
				elsif vert_count >= 495 and vert_count <= 502 and horz_count >= 260 and horz_count <= 260 then blue <= "11";
				elsif vert_count >= 499 and vert_count <= 504 and horz_count >= 261 and horz_count <= 261 then blue <= "11";
	
-------------------------------
			-- If the user entered an invaluid move then the valid_move signal goes to 0, so the text below shows the user to try again
			-- I in Invalid
				elsif horz_count >= 381 and horz_count <= 391 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 381 and horz_count <= 391 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 385 and horz_count <= 386 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
			-- N in Invalid
				elsif horz_count >= 394 and horz_count <= 395 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 403 and horz_count <= 404 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 396 and horz_count <= 396 and vert_count >= 469 and vert_count <= 476 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 397 and horz_count <= 397 and vert_count >= 472 and vert_count <= 482 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 398 and horz_count <= 398 and vert_count >= 477 and vert_count <= 488 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 399 and horz_count <= 399 and vert_count >= 484 and vert_count <= 493 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 400 and horz_count <= 400 and vert_count >= 490 and vert_count <= 497 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 401 and horz_count <= 401 and vert_count >= 494 and vert_count <= 502 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 402 and horz_count <= 402 and vert_count >= 499 and vert_count <= 504 and valid_move = '0' then blue <= "11";
			-- V in Invalid
				elsif horz_count >= 407 and horz_count <= 407 and vert_count >= 468 and vert_count <= 500 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 408 and horz_count <= 408 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 409 and horz_count <= 409 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 410 and horz_count <= 410 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 411 and horz_count <= 411 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 412 and horz_count <= 412 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 413 and horz_count <= 413 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 414 and horz_count <= 414 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 415 and horz_count <= 415 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 416 and horz_count <= 416 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 417 and horz_count <= 417 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 418 and horz_count <= 418 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then blue <= "11";
			-- A in Invalid	
				elsif horz_count >= 421 and horz_count <= 431 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 421 and horz_count <= 431 and vert_count >= 483 and vert_count <= 484 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 421 and horz_count <= 422 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 430 and horz_count <= 431 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
			-- L in Invalid
				elsif horz_count >= 434 and horz_count <= 435 and vert_count >= 468 and vert_count <= 505 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 434 and horz_count <= 444 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then blue <= "11";
			-- I in Invalid
				elsif horz_count >= 447 and horz_count <= 457 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 447 and horz_count <= 457 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 451 and horz_count <= 452 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
			-- d in Invalid
				elsif horz_count >= 469 and horz_count <= 470 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 460 and horz_count <= 461 and vert_count >= 491 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 460 and horz_count <= 470 and vert_count >= 491 and vert_count <= 492 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 460 and horz_count <= 470 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				
			-- M in Move
				elsif horz_count >= 479 and horz_count <= 489 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 479 and horz_count <= 480 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 488 and horz_count <= 489 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 484 and horz_count <= 484 and vert_count >= 468 and vert_count <= 483 and valid_move = '0' then blue <= "11";
			-- O in Move
				elsif horz_count >= 492 and horz_count <= 503 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 492 and horz_count <= 503 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 492 and horz_count <= 493 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 502 and horz_count <= 503 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
			-- V in Move
				elsif horz_count >= 506 and horz_count <= 506 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 507 and horz_count <= 507 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 508 and horz_count <= 508 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 509 and horz_count <= 509 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 510 and horz_count <= 510 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 511 and horz_count <= 511 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 512 and horz_count <= 512 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 513 and horz_count <= 513 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 514 and horz_count <= 514 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 515 and horz_count <= 515 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 516 and horz_count <= 516 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 517 and horz_count <= 517 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then blue <= "11";
			-- E in Move
				elsif horz_count >= 520 and horz_count <= 521 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 520 and horz_count <= 530 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 520 and horz_count <= 526 and vert_count >= 485 and vert_count <= 486 and valid_move = '0' then blue <= "11";
				elsif horz_count >= 520 and horz_count <= 530 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then blue <= "11";
								
--------------------------
			-- when the done signal goes high, the game is over, so display "GAME OVER" to the user
			-- G in Game
				elsif horz_count >= 640 and horz_count <= 641 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 640 and horz_count <= 651 and vert_count >= 505 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 647 and horz_count <= 656 and vert_count >= 491 and vert_count <= 492 and done = '1' then blue <= "11";
				elsif horz_count >= 650 and horz_count <= 651 and vert_count >= 491 and vert_count <= 506 and done = '1' then blue <= "11";
			-- A in Game
				elsif horz_count >= 659 and horz_count <= 669 and vert_count >= 477 and vert_count <= 478 and done = '1' then blue <= "11";
				elsif horz_count >= 659 and horz_count <= 669 and vert_count >= 491 and vert_count <= 492 and done = '1' then blue <= "11";
				elsif horz_count >= 659 and horz_count <= 660 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 668 and horz_count <= 669 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
			-- M in Game
				elsif horz_count >= 672 and horz_count <= 682 and vert_count >= 477 and vert_count <= 478 and done = '1' then blue <= "11";
				elsif horz_count >= 672 and horz_count <= 673 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 677 and horz_count <= 677 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 681 and horz_count <= 682 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
			-- E in Game
				elsif horz_count >= 685 and horz_count <= 694 and vert_count >= 477 and vert_count <= 478 and done = '1' then blue <= "11";
				elsif horz_count >= 685 and horz_count <= 686 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 685 and horz_count <= 690 and vert_count >= 491 and vert_count <= 492 and done = '1' then blue <= "11";
				elsif horz_count >= 685 and horz_count <= 694 and vert_count >= 505 and vert_count <= 506 and done = '1' then blue <= "11";
			-- O in Over
				elsif horz_count >= 699 and horz_count <= 709 and vert_count >= 477 and vert_count <= 478 and done = '1' then blue <= "11";
				elsif horz_count >= 699 and horz_count <= 700 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 708 and horz_count <= 709 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 699 and horz_count <= 709 and vert_count >= 505 and vert_count <= 506 and done = '1' then blue <= "11";
			-- V in Over	
				elsif horz_count >= 712 and horz_count <= 712 and vert_count >= 477 and vert_count <= 501 and done = '1' then blue <= "11";
				elsif horz_count >= 713 and horz_count <= 713 and vert_count >= 477 and vert_count <= 503 and done = '1' then blue <= "11";
				elsif horz_count >= 714 and horz_count <= 714 and vert_count >= 503 and vert_count <= 504 and done = '1' then blue <= "11";
				elsif horz_count >= 715 and horz_count <= 715 and vert_count >= 504 and vert_count <= 505 and done = '1' then blue <= "11";
				elsif horz_count >= 716 and horz_count <= 716 and vert_count >= 505 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 717 and horz_count <= 717 and vert_count >= 506 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 718 and horz_count <= 718 and vert_count >= 506 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 719 and horz_count <= 719 and vert_count >= 505 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 720 and horz_count <= 720 and vert_count >= 504 and vert_count <= 505 and done = '1' then blue <= "11";
				elsif horz_count >= 721 and horz_count <= 721 and vert_count >= 503 and vert_count <= 504 and done = '1' then blue <= "11";
				elsif horz_count >= 722 and horz_count <= 722 and vert_count >= 477 and vert_count <= 503 and done = '1' then blue <= "11";
				elsif horz_count >= 723 and horz_count <= 723 and vert_count >= 477 and vert_count <= 502 and done = '1' then blue <= "11";
			-- E in over
				elsif horz_count >= 726 and horz_count <= 735 and vert_count >= 477 and vert_count <= 478 and done = '1' then blue <= "11";
				elsif horz_count >= 726 and horz_count <= 735 and vert_count >= 505 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 726 and horz_count <= 731 and vert_count >= 491 and vert_count <= 492 and done = '1' then blue <= "11";
				elsif horz_count >= 726 and horz_count <= 727 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
			-- R in over
				elsif horz_count >= 738 and horz_count <= 748 and vert_count >= 477 and vert_count <= 478 and done = '1' then blue <= "11";
				elsif horz_count >= 738 and horz_count <= 748 and vert_count >= 488 and vert_count <= 489 and done = '1' then blue <= "11";
				elsif horz_count >= 738 and horz_count <= 739 and vert_count >= 477 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 747 and horz_count <= 748 and vert_count >= 477 and vert_count <= 489 and done = '1' then blue <= "11";
				elsif horz_count >= 740 and horz_count <= 740 and vert_count >= 491 and vert_count <= 492 and done = '1' then blue <= "11";
				elsif horz_count >= 741 and horz_count <= 741 and vert_count >= 492 and vert_count <= 494 and done = '1' then blue <= "11";
				elsif horz_count >= 742 and horz_count <= 742 and vert_count >= 493 and vert_count <= 496 and done = '1' then blue <= "11";
				elsif horz_count >= 743 and horz_count <= 743 and vert_count >= 495 and vert_count <= 498 and done = '1' then blue <= "11";
				elsif horz_count >= 744 and horz_count <= 744 and vert_count >= 497 and vert_count <= 498 and done = '1' then blue <= "11";
				elsif horz_count >= 745 and horz_count <= 745 and vert_count >= 498 and vert_count <= 501 and done = '1' then blue <= "11";
				elsif horz_count >= 746 and horz_count <= 746 and vert_count >= 500 and vert_count <= 504 and done = '1' then blue <= "11";
				elsif horz_count >= 747 and horz_count <= 747 and vert_count >= 503 and vert_count <= 506 and done = '1' then blue <= "11";
				elsif horz_count >= 748 and horz_count <= 748 and vert_count >= 505 and vert_count <= 506 and done = '1' then blue <= "11";
				
				else blue <= "00";
				end if;	
--				
--				----------------------------------------
--				-- RED
--				----------------------------------------	
				if    horz_count >= 160 and horz_count <= 211 and vert_count >= 49 and vert_count <= 79 and game_board(7,7) = BLACK then red <= "111"; -- Block (7,7)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 49 and vert_count <= 79 and game_board(6,7) = BLACK then red <= "111"; -- Block (6,7)  
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 49 and vert_count <= 79 and game_board(5,7) = BLACK then red <= "111"; -- Block (5,7)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 49 and vert_count <= 79 and game_board(4,7) = BLACK then red <= "111"; -- Block (4,7)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 49 and vert_count <= 79 and game_board(3,7) = BLACK then red <= "111"; -- Block (3,7)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 49 and vert_count <= 79 and game_board(2,7) = BLACK then red <= "111"; -- Block (2,7)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 49 and vert_count <= 79 and game_board(1,7) = BLACK then red <= "111"; -- Block (1,7)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 49 and vert_count <= 79 and game_board(0,7) = BLACK then red <= "111"; -- Block (0,7) 
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 96 and vert_count <= 126 and game_board(7,6) = BLACK then red <= "111"; -- Block (7,6)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 96 and vert_count <= 126 and game_board(6,6) = BLACK then red <= "111"; -- Block (6,6)  
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 96 and vert_count <= 126 and game_board(5,6) = BLACK then red <= "111"; -- Block (5,6)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 96 and vert_count <= 126 and game_board(4,6) = BLACK then red <= "111"; -- Block (4,6)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 96 and vert_count <= 126 and game_board(3,6) = BLACK then red <= "111"; -- Block (3,6)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 96 and vert_count <= 126 and game_board(2,6) = BLACK then red <= "111"; -- Block (2,6)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 96 and vert_count <= 126 and game_board(1,6) = BLACK then red <= "111"; -- Block (1,6)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 96 and vert_count <= 126 and game_board(0,6) = BLACK then red <= "111"; -- Block (0,6)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 147 and vert_count <= 177 and game_board(7,5) = BLACK then red <= "111"; -- Block (7,5)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 147 and vert_count <= 177 and game_board(6,5) = BLACK then red <= "111"; -- Block (6,5) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 147 and vert_count <= 177 and game_board(5,5) = BLACK then red <= "111"; -- Block (5,5)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 147 and vert_count <= 177 and game_board(4,5) = BLACK then red <= "111"; -- Block (4,5)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 147 and vert_count <= 177 and game_board(3,5) = BLACK then red <= "111"; -- Block (3,5)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 147 and vert_count <= 177 and game_board(2,5) = BLACK then red <= "111"; -- Block (2,5)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 147 and vert_count <= 177 and game_board(1,5) = BLACK then red <= "111"; -- Block (1,5)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 147 and vert_count <= 177 and game_board(0,5) = BLACK then red <= "111"; -- Block (0,5)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 198 and vert_count <= 228 and game_board(7,4) = BLACK  then red <= "111"; -- Block (7,4)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 198 and vert_count <= 228 and game_board(6,4) = BLACK then red <= "111"; -- Block (6,4) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 198 and vert_count <= 228 and game_board(5,4) = BLACK then red <= "111"; -- Block (5,4)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 198 and vert_count <= 228 and game_board(4,4) = BLACK then red <= "111"; -- Block (4,4)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 198 and vert_count <= 228 and game_board(3,4) = BLACK then red <= "111"; -- Block (3,4)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 198 and vert_count <= 228 and game_board(2,4) = BLACK then red <= "111"; -- Block (2,4)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 198 and vert_count <= 228 and game_board(1,4) = BLACK then red <= "111"; -- Block (1,4)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 198 and vert_count <= 228 and game_board(0,4) = BLACK then red <= "111"; -- Block (0,4)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 249 and vert_count <= 279 and game_board(7,3) = BLACK then red <= "111"; -- Block (7,3)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 249 and vert_count <= 279 and game_board(6,3) = BLACK then red <= "111"; -- Block (6,3)
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 249 and vert_count <= 279 and game_board(5,3) = BLACK then red <= "111"; -- Block (5,3)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 249 and vert_count <= 279 and game_board(4,3) = BLACK then red <= "111"; -- Block (4,3)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 249 and vert_count <= 279 and game_board(3,3) = BLACK then red <= "111"; -- Block (3,3)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 249 and vert_count <= 279 and game_board(2,3) = BLACK then red <= "111"; -- Block (2,3)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 249 and vert_count <= 279 and game_board(1,3) = BLACK then red <= "111"; -- Block (1,3)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 249 and vert_count <= 279 and game_board(0,3) = BLACK then red <= "111"; -- Block (0,3)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 300 and vert_count <= 330 and game_board(7,2) = BLACK then red <= "111"; -- Block (7,2)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 300 and vert_count <= 330 and game_board(6,2) = BLACK then red <= "111"; -- Block (6,2) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 300 and vert_count <= 330 and game_board(5,2) = BLACK then red <= "111"; -- Block (5,2)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 300 and vert_count <= 330 and game_board(4,2) = BLACK then red <= "111"; -- Block (4,2)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 300 and vert_count <= 330 and game_board(3,2) = BLACK then red <= "111"; -- Block (3,2)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 300 and vert_count <= 330 and game_board(2,2) = BLACK then red <= "111"; -- Block (2,2)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 300 and vert_count <= 330 and game_board(1,2) = BLACK then red <= "111"; -- Block (1,2)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 300 and vert_count <= 330 and game_board(0,2) = BLACK then red <= "111"; -- Block (0,2)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 351 and vert_count <= 381 and game_board(7,1) = BLACK then red <= "111"; -- Block (7,1)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 351 and vert_count <= 381 and game_board(6,1) = BLACK then red <= "111"; -- Block (6,1) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 351 and vert_count <= 381 and game_board(5,1) = BLACK then red <= "111"; -- Block (5,1)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 351 and vert_count <= 381 and game_board(4,1) = BLACK then red <= "111"; -- Block (4,1)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 351 and vert_count <= 381 and game_board(3,1) = BLACK then red <= "111"; -- Block (3,1)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 351 and vert_count <= 381 and game_board(2,1) = BLACK then red <= "111"; -- Block (2,1)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 351 and vert_count <= 381 and game_board(1,1) = BLACK then red <= "111"; -- Block (1,1)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 351 and vert_count <= 381 and game_board(0,1) = BLACK then red <= "111"; -- Block (0,1)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 402 and vert_count <= 432 and game_board(7,0) = BLACK then red <= "111"; -- Block (7,0)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 402 and vert_count <= 432 and game_board(6,0) = BLACK then red <= "111"; -- Block (6,0) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 402 and vert_count <= 432 and game_board(5,0) = BLACK then red <= "111"; -- Block (5,0)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 402 and vert_count <= 432 and game_board(4,0) = BLACK then red <= "111"; -- Block (4,0)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 402 and vert_count <= 432 and game_board(3,0) = BLACK then red <= "111"; -- Block (3,0)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 402 and vert_count <= 432 and game_board(2,0) = BLACK then red <= "111"; -- Block (2,0)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 402 and vert_count <= 432 and game_board(1,0) = BLACK then red <= "111"; -- Block (1,0)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 402 and vert_count <= 432 and game_board(0,0) = BLACK then red <= "111"; -- Block (0,0)

------------------				
			-- Vert Number 7
				elsif vert_count >= 49 and vert_count <= 49 and horz_count >= 153 and horz_count <= 157 then red <= "111";
				elsif vert_count >= 49 and vert_count <= 58 and horz_count >= 157 and horz_count <= 157 then red <= "111";
			-- Vert Number 6
				elsif vert_count >= 96 and vert_count <= 104 and horz_count >= 153 and horz_count <= 153 then red <= "111";
				elsif vert_count >= 100 and vert_count <= 104 and horz_count >= 157 and horz_count <= 157 then red <= "111";
				elsif vert_count >= 100 and vert_count <= 100 and horz_count >= 153 and horz_count <= 157 then red <= "111";
				elsif vert_count >= 104 and vert_count <= 104 and horz_count >= 153 and horz_count <= 157 then red <= "111";
			-- Vert Number 5
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 147 and vert_count <= 147 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 151 and vert_count <= 151 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 155 and vert_count <= 155 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 147 and vert_count <= 151 then red <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 151 and vert_count <= 155 then red <= "111";
			-- Vert Number 4
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 198 and vert_count <= 202 then red <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 198 and vert_count <= 207 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 202 and vert_count <= 202 then red <= "111";
			-- Vert Number 3
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 249 and vert_count <= 249 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 253 and vert_count <= 253 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 257 and vert_count <= 257 then red <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 249 and vert_count <= 257 then red <= "111";
			-- Vert number 2
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 304 and vert_count <= 308 then red <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 300 and vert_count <= 304 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 300 and vert_count <= 300 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 304 and vert_count <= 304 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 308 and vert_count <= 308 then red <= "111";
			-- Vert number 1
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 351 and vert_count <= 359 then red <= "111";
			-- Vert number 0
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 402 and vert_count <= 410 then red <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 402 and vert_count <= 410 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 402 and vert_count <= 402 then red <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 410 and vert_count <= 410 then red <= "111";
			-- Horz 6				
				elsif horz_count >= 227 and horz_count <= 227 and vert_count >= 49 and vert_count <= 57 then red <= "111";
				elsif horz_count >= 231 and horz_count <= 231 and vert_count >= 53 and vert_count <= 57 then red <= "111";
				elsif horz_count >= 227 and horz_count <= 231 and vert_count >= 53 and vert_count <= 53 then red <= "111";
				elsif horz_count >= 227 and horz_count <= 231 and vert_count >= 57 and vert_count <= 57 then red <= "111";
			-- Horz 5
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 49 and vert_count <= 49 then red <= "111";
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 53 and vert_count <= 53 then red <= "111";
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 57 and vert_count <= 57 then red <= "111";
				elsif horz_count >= 306 and horz_count <= 306 and vert_count >= 49 and vert_count <= 53 then red <= "111";
				elsif horz_count >= 310 and horz_count <= 310 and vert_count >= 53 and vert_count <= 57 then red <= "111";
			-- Horz number 4
				elsif horz_count >= 385 and horz_count <= 385 and vert_count >= 49 and vert_count <= 53 then red <= "111";
				elsif horz_count >= 389 and horz_count <= 389 and vert_count >= 49 and vert_count <= 57 then red <= "111";
				elsif horz_count >= 385 and horz_count <= 389 and vert_count >= 53 and vert_count <= 53 then red <= "111";
			-- Horz number 3
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 49 and vert_count <= 49 then red <= "111";
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 53 and vert_count <= 53 then red <= "111";
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 57 and vert_count <= 57 then red <= "111";
				elsif horz_count >= 468 and horz_count <= 468 and vert_count >= 49 and vert_count <= 57 then red <= "111";
			-- Horz number 2
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 49 and vert_count <= 49 then red <= "111";
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 53 and vert_count <= 53 then red <= "111";
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 57 and vert_count <= 57 then red <= "111";
				elsif horz_count >= 547 and horz_count <= 547 and vert_count >= 49 and vert_count <= 53 then red <= "111";
				elsif horz_count >= 543 and horz_count <= 543 and vert_count >= 53 and vert_count <= 57 then red <= "111";
			-- Horz number 1
				elsif horz_count >= 626 and horz_count <= 626 and vert_count >= 49 and vert_count <= 57 then red <= "111";
			-- Horz number 0
				elsif horz_count >= 705 and horz_count <= 705 and vert_count >= 49 and vert_count <= 57 then red <= "111";
				elsif horz_count >= 701 and horz_count <= 701 and vert_count >= 49 and vert_count <= 57 then red <= "111";
				elsif horz_count >= 701 and horz_count <= 705 and vert_count >= 49 and vert_count <= 49 then red <= "111";
				elsif horz_count >= 701 and horz_count <= 705 and vert_count >= 57 and vert_count <= 57 then red <= "111";
								
---------------------------				
			-- Block on Who's move it is
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 161 and horz_count <= 202 and player = '0' then red <= "111";
			
			-- Letter T 
				elsif vert_count >= 468 and vert_count <= 469 and horz_count >= 206 and horz_count <= 221 then red <= "111";
				elsif vert_count >= 470 and vert_count <= 506 and horz_count >= 213 and horz_count <= 214 then red <= "111"; 
			-- Letter U	
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 224 and horz_count <= 225 then red <= "111";			
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 233 and horz_count <= 234 then red <= "111"; 
				elsif vert_count >= 505 and vert_count <= 506 and horz_count >= 226 and horz_count <= 232 then red <= "111"; 
			-- Letter R 
				elsif vert_count >= 468 and vert_count <= 469 and horz_count >= 237 and horz_count <= 247 then red <= "111";				
				elsif vert_count >= 478 and vert_count <= 479 and horz_count >= 237 and horz_count <= 247 then red <= "111"; 
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 237 and horz_count <= 238 then red <= "111"; 
				elsif vert_count >= 468 and vert_count <= 479 and horz_count >= 246 and horz_count <= 247 then red <= "111"; 
				elsif vert_count >= 481 and vert_count <= 483 and horz_count >= 239 and horz_count <= 239 then red <= "111";
				elsif vert_count >= 482 and vert_count <= 484 and horz_count >= 240 and horz_count <= 240 then red <= "111"; 
				elsif vert_count >= 484 and vert_count <= 487 and horz_count >= 241 and horz_count <= 241 then red <= "111"; 
				elsif vert_count >= 486 and vert_count <= 489 and horz_count >= 242 and horz_count <= 242 then red <= "111";
				elsif vert_count >= 488 and vert_count <= 491 and horz_count >= 243 and horz_count <= 243 then red <= "111";
				elsif vert_count >= 490 and vert_count <= 493 and horz_count >= 244 and horz_count <= 244 then red <= "111";
				elsif vert_count >= 492 and vert_count <= 495 and horz_count >= 245 and horz_count <= 245 then red <= "111";
				elsif vert_count >= 494 and vert_count <= 498 and horz_count >= 246 and horz_count <= 246 then red <= "111";
				elsif vert_count >= 496 and vert_count <= 501 and horz_count >= 247 and horz_count <= 247 then red <= "111";
				elsif vert_count >= 499 and vert_count <= 503 and horz_count >= 248 and horz_count <= 248 then red <= "111";
				elsif vert_count >= 501 and vert_count <= 507 and horz_count >= 249 and horz_count <= 249 then red <= "111";
				elsif vert_count >= 504 and vert_count <= 507 and horz_count >= 250 and horz_count <= 250 then red <= "111";
			-- Letter N 
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 253 and horz_count <= 254 then red <= "111";
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 262 and horz_count <= 263 then red <= "111";
				elsif vert_count >= 469 and vert_count <= 475 and horz_count >= 255 and horz_count <= 255 then red <= "111";
				elsif vert_count >= 472 and vert_count <= 482 and horz_count >= 256 and horz_count <= 256 then red <= "111";
				elsif vert_count >= 477 and vert_count <= 487 and horz_count >= 257 and horz_count <= 257 then red <= "111";
				elsif vert_count >= 484 and vert_count <= 493 and horz_count >= 258 and horz_count <= 258 then red <= "111";
				elsif vert_count >= 490 and vert_count <= 497 and horz_count >= 259 and horz_count <= 259 then red <= "111";
				elsif vert_count >= 495 and vert_count <= 502 and horz_count >= 260 and horz_count <= 260 then red <= "111";
				elsif vert_count >= 499 and vert_count <= 504 and horz_count >= 261 and horz_count <= 261 then red <= "111";					

----------------------
			-- I in Invalid
				elsif horz_count >= 381 and horz_count <= 391 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then red <= "111";
				elsif horz_count >= 381 and horz_count <= 391 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 385 and horz_count <= 386 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
			-- N in Invalid
				elsif horz_count >= 394 and horz_count <= 395 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 403 and horz_count <= 404 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 396 and horz_count <= 396 and vert_count >= 469 and vert_count <= 476 and valid_move = '0' then red <= "111";
				elsif horz_count >= 397 and horz_count <= 397 and vert_count >= 472 and vert_count <= 482 and valid_move = '0' then red <= "111";
				elsif horz_count >= 398 and horz_count <= 398 and vert_count >= 477 and vert_count <= 488 and valid_move = '0' then red <= "111";
				elsif horz_count >= 399 and horz_count <= 399 and vert_count >= 484 and vert_count <= 493 and valid_move = '0' then red <= "111";
				elsif horz_count >= 400 and horz_count <= 400 and vert_count >= 490 and vert_count <= 497 and valid_move = '0' then red <= "111";
				elsif horz_count >= 401 and horz_count <= 401 and vert_count >= 494 and vert_count <= 502 and valid_move = '0' then red <= "111";
				elsif horz_count >= 402 and horz_count <= 402 and vert_count >= 499 and vert_count <= 504 and valid_move = '0' then red <= "111";
			-- V in Invalid
				elsif horz_count >= 407 and horz_count <= 407 and vert_count >= 468 and vert_count <= 500 and valid_move = '0' then red <= "111";
				elsif horz_count >= 408 and horz_count <= 408 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then red <= "111";
				elsif horz_count >= 409 and horz_count <= 409 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then red <= "111";
				elsif horz_count >= 410 and horz_count <= 410 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then red <= "111";
				elsif horz_count >= 411 and horz_count <= 411 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then red <= "111";
				elsif horz_count >= 412 and horz_count <= 412 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 413 and horz_count <= 413 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 414 and horz_count <= 414 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then red <= "111";
				elsif horz_count >= 415 and horz_count <= 415 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then red <= "111";
				elsif horz_count >= 416 and horz_count <= 416 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then red <= "111";
				elsif horz_count >= 417 and horz_count <= 417 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then red <= "111";
				elsif horz_count >= 418 and horz_count <= 418 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then red <= "111";
			-- A in Invalid	
				elsif horz_count >= 421 and horz_count <= 431 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then red <= "111";
				elsif horz_count >= 421 and horz_count <= 431 and vert_count >= 483 and vert_count <= 484 and valid_move = '0' then red <= "111";
				elsif horz_count >= 421 and horz_count <= 422 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 430 and horz_count <= 431 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
			-- L in Invalid
				elsif horz_count >= 434 and horz_count <= 435 and vert_count >= 468 and vert_count <= 505 and valid_move = '0' then red <= "111";
				elsif horz_count >= 434 and horz_count <= 444 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then red <= "111";
			-- I in Invalid
				elsif horz_count >= 447 and horz_count <= 457 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then red <= "111";
				elsif horz_count >= 447 and horz_count <= 457 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 451 and horz_count <= 452 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
			-- d in Invalid
				elsif horz_count >= 469 and horz_count <= 470 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 460 and horz_count <= 461 and vert_count >= 491 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 460 and horz_count <= 470 and vert_count >= 491 and vert_count <= 492 and valid_move = '0' then red <= "111";
				elsif horz_count >= 460 and horz_count <= 470 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				
			-- M in Move
				elsif horz_count >= 479 and horz_count <= 489 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then red <= "111";
				elsif horz_count >= 479 and horz_count <= 480 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 488 and horz_count <= 489 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 484 and horz_count <= 484 and vert_count >= 468 and vert_count <= 483 and valid_move = '0' then red <= "111";
			-- O in Move
				elsif horz_count >= 492 and horz_count <= 503 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then red <= "111";
				elsif horz_count >= 492 and horz_count <= 503 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 492 and horz_count <= 493 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 502 and horz_count <= 503 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
			-- V in Move
				elsif horz_count >= 506 and horz_count <= 506 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then red <= "111";
				elsif horz_count >= 507 and horz_count <= 507 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then red <= "111";
				elsif horz_count >= 508 and horz_count <= 508 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then red <= "111";
				elsif horz_count >= 509 and horz_count <= 509 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then red <= "111";
				elsif horz_count >= 510 and horz_count <= 510 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then red <= "111";
				elsif horz_count >= 511 and horz_count <= 511 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 512 and horz_count <= 512 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 513 and horz_count <= 513 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then red <= "111";
				elsif horz_count >= 514 and horz_count <= 514 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then red <= "111";
				elsif horz_count >= 515 and horz_count <= 515 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then red <= "111";
				elsif horz_count >= 516 and horz_count <= 516 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then red <= "111";
				elsif horz_count >= 517 and horz_count <= 517 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then red <= "111";
			-- E in Move
				elsif horz_count >= 520 and horz_count <= 521 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then red <= "111";
				elsif horz_count >= 520 and horz_count <= 530 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then red <= "111";
				elsif horz_count >= 520 and horz_count <= 526 and vert_count >= 485 and vert_count <= 486 and valid_move = '0' then red <= "111";
				elsif horz_count >= 520 and horz_count <= 530 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then red <= "111";
				
----------------------				
			-- G in Game
				elsif horz_count >= 640 and horz_count <= 641 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 640 and horz_count <= 651 and vert_count >= 505 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 647 and horz_count <= 656 and vert_count >= 491 and vert_count <= 492 and done = '1' then red <= "111";
				elsif horz_count >= 650 and horz_count <= 651 and vert_count >= 491 and vert_count <= 506 and done = '1' then red <= "111";
			-- A in Game
				elsif horz_count >= 659 and horz_count <= 669 and vert_count >= 477 and vert_count <= 478 and done = '1' then red <= "111";
				elsif horz_count >= 659 and horz_count <= 669 and vert_count >= 491 and vert_count <= 492 and done = '1' then red <= "111";
				elsif horz_count >= 659 and horz_count <= 660 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 668 and horz_count <= 669 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
			-- M in Game
				elsif horz_count >= 672 and horz_count <= 682 and vert_count >= 477 and vert_count <= 478 and done = '1' then red <= "111";
				elsif horz_count >= 672 and horz_count <= 673 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 677 and horz_count <= 677 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 681 and horz_count <= 682 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
			-- E in Game
				elsif horz_count >= 685 and horz_count <= 694 and vert_count >= 477 and vert_count <= 478 and done = '1' then red <= "111";
				elsif horz_count >= 685 and horz_count <= 686 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 685 and horz_count <= 690 and vert_count >= 491 and vert_count <= 492 and done = '1' then red <= "111";
				elsif horz_count >= 685 and horz_count <= 694 and vert_count >= 505 and vert_count <= 506 and done = '1' then red <= "111";
			-- O in Over
				elsif horz_count >= 699 and horz_count <= 709 and vert_count >= 477 and vert_count <= 478 and done = '1' then red <= "111";
				elsif horz_count >= 699 and horz_count <= 700 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 708 and horz_count <= 709 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 699 and horz_count <= 709 and vert_count >= 505 and vert_count <= 506 and done = '1' then red <= "111";
			-- V in Over	
				elsif horz_count >= 712 and horz_count <= 712 and vert_count >= 477 and vert_count <= 501 and done = '1' then red <= "111";
				elsif horz_count >= 713 and horz_count <= 713 and vert_count >= 477 and vert_count <= 503 and done = '1' then red <= "111";
				elsif horz_count >= 714 and horz_count <= 714 and vert_count >= 503 and vert_count <= 504 and done = '1' then red <= "111";
				elsif horz_count >= 715 and horz_count <= 715 and vert_count >= 504 and vert_count <= 505 and done = '1' then red <= "111";
				elsif horz_count >= 716 and horz_count <= 716 and vert_count >= 505 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 717 and horz_count <= 717 and vert_count >= 506 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 718 and horz_count <= 718 and vert_count >= 506 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 719 and horz_count <= 719 and vert_count >= 505 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 720 and horz_count <= 720 and vert_count >= 504 and vert_count <= 505 and done = '1' then red <= "111";
				elsif horz_count >= 721 and horz_count <= 721 and vert_count >= 503 and vert_count <= 504 and done = '1' then red <= "111";
				elsif horz_count >= 722 and horz_count <= 722 and vert_count >= 477 and vert_count <= 503 and done = '1' then red <= "111";
				elsif horz_count >= 723 and horz_count <= 723 and vert_count >= 477 and vert_count <= 502 and done = '1' then red <= "111";
			-- E in over
				elsif horz_count >= 726 and horz_count <= 735 and vert_count >= 477 and vert_count <= 478 and done = '1' then red <= "111";
				elsif horz_count >= 726 and horz_count <= 735 and vert_count >= 505 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 726 and horz_count <= 731 and vert_count >= 491 and vert_count <= 492 and done = '1' then red <= "111";
				elsif horz_count >= 726 and horz_count <= 727 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
			-- R in over
				elsif horz_count >= 738 and horz_count <= 748 and vert_count >= 477 and vert_count <= 478 and done = '1' then red <= "111";
				elsif horz_count >= 738 and horz_count <= 748 and vert_count >= 488 and vert_count <= 489 and done = '1' then red <= "111";
				elsif horz_count >= 738 and horz_count <= 739 and vert_count >= 477 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 747 and horz_count <= 748 and vert_count >= 477 and vert_count <= 489 and done = '1' then red <= "111";
				elsif horz_count >= 740 and horz_count <= 740 and vert_count >= 491 and vert_count <= 492 and done = '1' then red <= "111";
				elsif horz_count >= 741 and horz_count <= 741 and vert_count >= 492 and vert_count <= 494 and done = '1' then red <= "111";
				elsif horz_count >= 742 and horz_count <= 742 and vert_count >= 493 and vert_count <= 496 and done = '1' then red <= "111";
				elsif horz_count >= 743 and horz_count <= 743 and vert_count >= 495 and vert_count <= 498 and done = '1' then red <= "111";
				elsif horz_count >= 744 and horz_count <= 744 and vert_count >= 497 and vert_count <= 498 and done = '1' then red <= "111";
				elsif horz_count >= 745 and horz_count <= 745 and vert_count >= 498 and vert_count <= 501 and done = '1' then red <= "111";
				elsif horz_count >= 746 and horz_count <= 746 and vert_count >= 500 and vert_count <= 504 and done = '1' then red <= "111";
				elsif horz_count >= 747 and horz_count <= 747 and vert_count >= 503 and vert_count <= 506 and done = '1' then red <= "111";
				elsif horz_count >= 748 and horz_count <= 748 and vert_count >= 505 and vert_count <= 506 and done = '1' then red <= "111";
				
				else red <= "000";
				end if;
				
				
				
				----------------------------------------
				-- GREEN
				----------------------------------------
				if    horz_count >= 160 and horz_count <= 211 and vert_count >= 49 and vert_count <= 79 and game_board(7,7) /= EMPTY then green <= "000"; -- Block (7,7)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 49 and vert_count <= 79 and game_board(6,7) /= EMPTY then green <= "000"; -- Block (6,7)  
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 49 and vert_count <= 79 and game_board(5,7) /= EMPTY then green <= "000"; -- Block (5,7)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 49 and vert_count <= 79 and game_board(4,7) /= EMPTY then green <= "000"; -- Block (4,7)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 49 and vert_count <= 79 and game_board(3,7) /= EMPTY then green <= "000"; -- Block (3,7)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 49 and vert_count <= 79 and game_board(2,7) /= EMPTY then green <= "000"; -- Block (2,7)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 49 and vert_count <= 79 and game_board(1,7) /= EMPTY then green <= "000"; -- Block (1,7)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 49 and vert_count <= 79 and game_board(0,7) /= EMPTY then green <= "000"; -- Block (0,7) 
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 96 and vert_count <= 126 and game_board(7,6) /= EMPTY then green <= "000"; -- Block (7,6)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 96 and vert_count <= 126 and game_board(6,6) /= EMPTY then green <= "000"; -- Block (6,6)  
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 96 and vert_count <= 126 and game_board(5,6) /= EMPTY then green <= "000"; -- Block (5,6)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 96 and vert_count <= 126 and game_board(4,6) /= EMPTY then green <= "000"; -- Block (4,6)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 96 and vert_count <= 126 and game_board(3,6) /= EMPTY then green <= "000"; -- Block (3,6)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 96 and vert_count <= 126 and game_board(2,6) /= EMPTY then green <= "000"; -- Block (2,6)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 96 and vert_count <= 126 and game_board(1,6) /= EMPTY then green <= "000"; -- Block (1,6)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 96 and vert_count <= 126 and game_board(0,6) /= EMPTY then green <= "000"; -- Block (0,6)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 147 and vert_count <= 177 and game_board(7,5) /= EMPTY then green <= "000"; -- Block (7,5)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 147 and vert_count <= 177 and game_board(6,5) /= EMPTY then green <= "000"; -- Block (6,5) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 147 and vert_count <= 177 and game_board(5,5) /= EMPTY then green <= "000"; -- Block (5,5)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 147 and vert_count <= 177 and game_board(4,5) /= EMPTY then green <= "000"; -- Block (4,5)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 147 and vert_count <= 177 and game_board(3,5) /= EMPTY then green <= "000"; -- Block (3,5)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 147 and vert_count <= 177 and game_board(2,5) /= EMPTY then green <= "000"; -- Block (2,5)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 147 and vert_count <= 177 and game_board(1,5) /= EMPTY then green <= "000"; -- Block (1,5)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 147 and vert_count <= 177 and game_board(0,5) /= EMPTY then green <= "000"; -- Block (0,5)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 198 and vert_count <= 228 and game_board(7,4) /= EMPTY  then green <= "000"; -- Block (7,4)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 198 and vert_count <= 228 and game_board(6,4) /= EMPTY then green <= "000"; -- Block (6,4) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 198 and vert_count <= 228 and game_board(5,4) /= EMPTY then green <= "000"; -- Block (5,4)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 198 and vert_count <= 228 and game_board(4,4) /= EMPTY then green <= "000"; -- Block (4,4)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 198 and vert_count <= 228 and game_board(3,4) /= EMPTY then green <= "000"; -- Block (3,4)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 198 and vert_count <= 228 and game_board(2,4) /= EMPTY then green <= "000"; -- Block (2,4)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 198 and vert_count <= 228 and game_board(1,4) /= EMPTY then green <= "000"; -- Block (1,4)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 198 and vert_count <= 228 and game_board(0,4) /= EMPTY then green <= "000"; -- Block (0,4)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 249 and vert_count <= 279 and game_board(7,3) /= EMPTY then green <= "000"; -- Block (7,3)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 249 and vert_count <= 279 and game_board(6,3) /= EMPTY then green <= "000"; -- Block (6,3)
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 249 and vert_count <= 279 and game_board(5,3) /= EMPTY then green <= "000"; -- Block (5,3)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 249 and vert_count <= 279 and game_board(4,3) /= EMPTY then green <= "000"; -- Block (4,3)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 249 and vert_count <= 279 and game_board(3,3) /= EMPTY then green <= "000"; -- Block (3,3)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 249 and vert_count <= 279 and game_board(2,3) /= EMPTY then green <= "000"; -- Block (2,3)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 249 and vert_count <= 279 and game_board(1,3) /= EMPTY then green <= "000"; -- Block (1,3)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 249 and vert_count <= 279 and game_board(0,3) /= EMPTY then green <= "000"; -- Block (0,3)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 300 and vert_count <= 330 and game_board(7,2) /= EMPTY then green <= "000"; -- Block (7,2)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 300 and vert_count <= 330 and game_board(6,2) /= EMPTY then green <= "000"; -- Block (6,2) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 300 and vert_count <= 330 and game_board(5,2) /= EMPTY then green <= "000"; -- Block (5,2)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 300 and vert_count <= 330 and game_board(4,2) /= EMPTY then green <= "000"; -- Block (4,2)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 300 and vert_count <= 330 and game_board(3,2) /= EMPTY then green <= "000"; -- Block (3,2)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 300 and vert_count <= 330 and game_board(2,2) /= EMPTY then green <= "000"; -- Block (2,2)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 300 and vert_count <= 330 and game_board(1,2) /= EMPTY then green <= "000"; -- Block (1,2)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 300 and vert_count <= 330 and game_board(0,2) /= EMPTY then green <= "000"; -- Block (0,2)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 351 and vert_count <= 381 and game_board(7,1) /= EMPTY then green <= "000"; -- Block (7,1)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 351 and vert_count <= 381 and game_board(6,1) /= EMPTY then green <= "000"; -- Block (6,1) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 351 and vert_count <= 381 and game_board(5,1) /= EMPTY then green <= "000"; -- Block (5,1)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 351 and vert_count <= 381 and game_board(4,1) /= EMPTY then green <= "000"; -- Block (4,1)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 351 and vert_count <= 381 and game_board(3,1) /= EMPTY then green <= "000"; -- Block (3,1)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 351 and vert_count <= 381 and game_board(2,1) /= EMPTY then green <= "000"; -- Block (2,1)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 351 and vert_count <= 381 and game_board(1,1) /= EMPTY then green <= "000"; -- Block (1,1)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 351 and vert_count <= 381 and game_board(0,1) /= EMPTY then green <= "000"; -- Block (0,1)
				
				elsif horz_count >= 160 and horz_count <= 211 and vert_count >= 402 and vert_count <= 432 and game_board(7,0) /= EMPTY then green <= "000"; -- Block (7,0)
				elsif horz_count >= 234 and horz_count <= 285 and vert_count >= 402 and vert_count <= 432 and game_board(6,0) /= EMPTY then green <= "000"; -- Block (6,0) 
				elsif horz_count >= 313 and horz_count <= 364 and vert_count >= 402 and vert_count <= 432 and game_board(5,0) /= EMPTY then green <= "000"; -- Block (5,0)
				elsif horz_count >= 392 and horz_count <= 443 and vert_count >= 402 and vert_count <= 432 and game_board(4,0) /= EMPTY then green <= "000"; -- Block (4,0)
				elsif horz_count >= 471 and horz_count <= 522 and vert_count >= 402 and vert_count <= 432 and game_board(3,0) /= EMPTY then green <= "000"; -- Block (3,0)
				elsif horz_count >= 550 and horz_count <= 601 and vert_count >= 402 and vert_count <= 432 and game_board(2,0) /= EMPTY then green <= "000"; -- Block (2,0)
				elsif horz_count >= 629 and horz_count <= 680 and vert_count >= 402 and vert_count <= 432 and game_board(1,0) /= EMPTY then green <= "000"; -- Block (1,0)
				elsif horz_count >= 708 and horz_count <= 759 and vert_count >= 402 and vert_count <= 432 and game_board(0,0) /= EMPTY then green <= "000"; -- Block (0,0)
				
--------------------
				-- Create the game board grid
			--black Horizontal Bars
				elsif vert_count >= 85 and vert_count <= 92 and horz_count >= 146 and horz_count <= 783 then green <= "000";
				elsif vert_count >= 136 and vert_count <= 143 and horz_count >= 146 and horz_count <= 783 then green <= "000";	  
				elsif  vert_count >= 187 and vert_count <= 194 and horz_count >= 146 and horz_count <= 783 then green <= "000";
				elsif  vert_count >= 238 and vert_count <= 245 and horz_count >= 146 and horz_count <= 783 then green <= "000";	  
				elsif  vert_count >= 289 and vert_count <= 296 and horz_count >= 146 and horz_count <= 783 then green <= "000";
				elsif  vert_count >= 340 and vert_count <= 347 and horz_count >= 146 and horz_count <= 783 then green <= "000";	  
				elsif  vert_count >= 391 and vert_count <= 398 and horz_count >= 146 and horz_count <= 783 then green <= "000";	  
			-- black Verticle Bars
				elsif  vert_count >= 42 and vert_count <= 442 and horz_count >= 217 and horz_count <= 224 then green <= "000";	   
				elsif  vert_count >= 42 and vert_count <= 442 and horz_count >= 296 and horz_count <= 303 then green <= "000";	  
				elsif  vert_count >= 42 and vert_count <= 442 and horz_count >= 375 and horz_count <= 382 then green <= "000";	  
				elsif  vert_count >= 42 and vert_count <= 442 and horz_count >= 454 and horz_count <= 461 then green <= "000";	  
				elsif  vert_count >= 42 and vert_count <= 442 and horz_count >= 533 and horz_count <= 540 then green <= "000";	  
				elsif  vert_count >= 42 and vert_count <= 442 and horz_count >= 612 and horz_count <= 619 then green <= "000";	  
				elsif  vert_count >= 42 and vert_count <= 442 and horz_count >= 691 and horz_count <= 698 then green <= "000";	  
			-- black Border
				elsif vert_count >= 443 and vert_count < 450 and horz_count >= 144 and horz_count < 785 then green <= "000"; 	-- Bottom Border
				elsif vert_count >= 40 and vert_count < 42 and horz_count >= 0 and horz_count < 800 then green <= "000"; 		-- Top Border
				elsif vert_count >= 40 and vert_count < 450 and horz_count >= 144 and horz_count < 146 then green <= "000"; 	-- Left Border
				elsif vert_count >= 40 and vert_count < 450 and horz_count >= 783 and horz_count < 785 then green <= "000";		-- Right Border

-----------------				
			-- Letter T 
				elsif vert_count >= 468 and vert_count <= 469 and horz_count >= 206 and horz_count <= 221 then green <= "111";
				elsif vert_count >= 470 and vert_count <= 506 and horz_count >= 213 and horz_count <= 214 then green <= "111"; 
			-- Letter U	
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 224 and horz_count <= 225 then green <= "111";			
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 233 and horz_count <= 234 then green <= "111"; 
				elsif vert_count >= 505 and vert_count <= 506 and horz_count >= 226 and horz_count <= 232 then green <= "111"; 
			-- Letter R 
				elsif vert_count >= 468 and vert_count <= 469 and horz_count >= 237 and horz_count <= 247 then green <= "111";				
				elsif vert_count >= 478 and vert_count <= 479 and horz_count >= 237 and horz_count <= 247 then green <= "111"; 
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 237 and horz_count <= 238 then green <= "111"; 
				elsif vert_count >= 468 and vert_count <= 479 and horz_count >= 246 and horz_count <= 247 then green <= "111"; 
				elsif vert_count >= 481 and vert_count <= 483 and horz_count >= 239 and horz_count <= 239 then green <= "111";
				elsif vert_count >= 482 and vert_count <= 484 and horz_count >= 240 and horz_count <= 240 then green <= "111"; 
				elsif vert_count >= 484 and vert_count <= 487 and horz_count >= 241 and horz_count <= 241 then green <= "111"; 
				elsif vert_count >= 486 and vert_count <= 489 and horz_count >= 242 and horz_count <= 242 then green <= "111";
				elsif vert_count >= 488 and vert_count <= 491 and horz_count >= 243 and horz_count <= 243 then green <= "111";
				elsif vert_count >= 490 and vert_count <= 493 and horz_count >= 244 and horz_count <= 244 then green <= "111";
				elsif vert_count >= 492 and vert_count <= 495 and horz_count >= 245 and horz_count <= 245 then green <= "111";
				elsif vert_count >= 494 and vert_count <= 498 and horz_count >= 246 and horz_count <= 246 then green <= "111";
				elsif vert_count >= 496 and vert_count <= 501 and horz_count >= 247 and horz_count <= 247 then green <= "111";
				elsif vert_count >= 499 and vert_count <= 503 and horz_count >= 248 and horz_count <= 248 then green <= "111";
				elsif vert_count >= 501 and vert_count <= 507 and horz_count >= 249 and horz_count <= 249 then green <= "111";
				elsif vert_count >= 504 and vert_count <= 507 and horz_count >= 250 and horz_count <= 250 then green <= "111";
			-- Letter N 
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 253 and horz_count <= 254 then green <= "111";
				elsif vert_count >= 468 and vert_count <= 506 and horz_count >= 262 and horz_count <= 263 then green <= "111";
				elsif vert_count >= 469 and vert_count <= 475 and horz_count >= 255 and horz_count <= 255 then green <= "111";
				elsif vert_count >= 472 and vert_count <= 482 and horz_count >= 256 and horz_count <= 256 then green <= "111";
				elsif vert_count >= 477 and vert_count <= 487 and horz_count >= 257 and horz_count <= 257 then green <= "111";
				elsif vert_count >= 484 and vert_count <= 493 and horz_count >= 258 and horz_count <= 258 then green <= "111";
				elsif vert_count >= 490 and vert_count <= 497 and horz_count >= 259 and horz_count <= 259 then green <= "111";
				elsif vert_count >= 495 and vert_count <= 502 and horz_count >= 260 and horz_count <= 260 then green <= "111";
				elsif vert_count >= 499 and vert_count <= 504 and horz_count >= 261 and horz_count <= 261 then green <= "111";

----------------------
			-- I in Invalid
				elsif horz_count >= 381 and horz_count <= 391 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then green <= "111";
				elsif horz_count >= 381 and horz_count <= 391 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 385 and horz_count <= 386 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
			-- N in Invalid
				elsif horz_count >= 394 and horz_count <= 395 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 403 and horz_count <= 404 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 396 and horz_count <= 396 and vert_count >= 469 and vert_count <= 476 and valid_move = '0' then green <= "111";
				elsif horz_count >= 397 and horz_count <= 397 and vert_count >= 472 and vert_count <= 482 and valid_move = '0' then green <= "111";
				elsif horz_count >= 398 and horz_count <= 398 and vert_count >= 477 and vert_count <= 488 and valid_move = '0' then green <= "111";
				elsif horz_count >= 399 and horz_count <= 399 and vert_count >= 484 and vert_count <= 493 and valid_move = '0' then green <= "111";
				elsif horz_count >= 400 and horz_count <= 400 and vert_count >= 490 and vert_count <= 497 and valid_move = '0' then green <= "111";
				elsif horz_count >= 401 and horz_count <= 401 and vert_count >= 494 and vert_count <= 502 and valid_move = '0' then green <= "111";
				elsif horz_count >= 402 and horz_count <= 402 and vert_count >= 499 and vert_count <= 504 and valid_move = '0' then green <= "111";
			-- V in Invalid
				elsif horz_count >= 407 and horz_count <= 407 and vert_count >= 468 and vert_count <= 500 and valid_move = '0' then green <= "111";
				elsif horz_count >= 408 and horz_count <= 408 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then green <= "111";
				elsif horz_count >= 409 and horz_count <= 409 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then green <= "111";
				elsif horz_count >= 410 and horz_count <= 410 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then green <= "111";
				elsif horz_count >= 411 and horz_count <= 411 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then green <= "111";
				elsif horz_count >= 412 and horz_count <= 412 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 413 and horz_count <= 413 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 414 and horz_count <= 414 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then green <= "111";
				elsif horz_count >= 415 and horz_count <= 415 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then green <= "111";
				elsif horz_count >= 416 and horz_count <= 416 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then green <= "111";
				elsif horz_count >= 417 and horz_count <= 417 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then green <= "111";
				elsif horz_count >= 418 and horz_count <= 418 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then green <= "111";
			-- A in Invalid	
				elsif horz_count >= 421 and horz_count <= 431 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then green <= "111";
				elsif horz_count >= 421 and horz_count <= 431 and vert_count >= 483 and vert_count <= 484 and valid_move = '0' then green <= "111";
				elsif horz_count >= 421 and horz_count <= 422 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 430 and horz_count <= 431 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
			-- L in Invalid
				elsif horz_count >= 434 and horz_count <= 435 and vert_count >= 468 and vert_count <= 505 and valid_move = '0' then green <= "111";
				elsif horz_count >= 434 and horz_count <= 444 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then green <= "111";
			-- I in Invalid
				elsif horz_count >= 447 and horz_count <= 457 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then green <= "111";
				elsif horz_count >= 447 and horz_count <= 457 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 451 and horz_count <= 452 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
			-- d in Invalid
				elsif horz_count >= 469 and horz_count <= 470 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 460 and horz_count <= 461 and vert_count >= 491 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 460 and horz_count <= 470 and vert_count >= 491 and vert_count <= 492 and valid_move = '0' then green <= "111";
				elsif horz_count >= 460 and horz_count <= 470 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				
			-- M in Move
				elsif horz_count >= 479 and horz_count <= 489 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then green <= "111";
				elsif horz_count >= 479 and horz_count <= 480 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 488 and horz_count <= 489 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 484 and horz_count <= 484 and vert_count >= 468 and vert_count <= 483 and valid_move = '0' then green <= "111";
			-- O in Move
				elsif horz_count >= 492 and horz_count <= 503 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then green <= "111";
				elsif horz_count >= 492 and horz_count <= 503 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 492 and horz_count <= 493 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 502 and horz_count <= 503 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
			-- V in Move
				elsif horz_count >= 506 and horz_count <= 506 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then green <= "111";
				elsif horz_count >= 507 and horz_count <= 507 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then green <= "111";
				elsif horz_count >= 508 and horz_count <= 508 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then green <= "111";
				elsif horz_count >= 509 and horz_count <= 509 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then green <= "111";
				elsif horz_count >= 510 and horz_count <= 510 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then green <= "111";
				elsif horz_count >= 511 and horz_count <= 511 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 512 and horz_count <= 512 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 513 and horz_count <= 513 and vert_count >= 504 and vert_count <= 505 and valid_move = '0' then green <= "111";
				elsif horz_count >= 514 and horz_count <= 514 and vert_count >= 503 and vert_count <= 504 and valid_move = '0' then green <= "111";
				elsif horz_count >= 515 and horz_count <= 515 and vert_count >= 502 and vert_count <= 503 and valid_move = '0' then green <= "111";
				elsif horz_count >= 516 and horz_count <= 516 and vert_count >= 468 and vert_count <= 502 and valid_move = '0' then green <= "111";
				elsif horz_count >= 517 and horz_count <= 517 and vert_count >= 468 and vert_count <= 501 and valid_move = '0' then green <= "111";
			-- E in Move
				elsif horz_count >= 520 and horz_count <= 521 and vert_count >= 468 and vert_count <= 506 and valid_move = '0' then green <= "111";
				elsif horz_count >= 520 and horz_count <= 530 and vert_count >= 468 and vert_count <= 469 and valid_move = '0' then green <= "111";
				elsif horz_count >= 520 and horz_count <= 526 and vert_count >= 485 and vert_count <= 486 and valid_move = '0' then green <= "111";
				elsif horz_count >= 520 and horz_count <= 530 and vert_count >= 505 and vert_count <= 506 and valid_move = '0' then green <= "111";
				
------------------------				
			-- G in Game
				elsif horz_count >= 640 and horz_count <= 641 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 640 and horz_count <= 651 and vert_count >= 505 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 647 and horz_count <= 656 and vert_count >= 491 and vert_count <= 492 and done = '1' then green <= "111";
				elsif horz_count >= 650 and horz_count <= 651 and vert_count >= 491 and vert_count <= 506 and done = '1' then green <= "111";
			-- A in Game
				elsif horz_count >= 659 and horz_count <= 669 and vert_count >= 477 and vert_count <= 478 and done = '1' then green <= "111";
				elsif horz_count >= 659 and horz_count <= 669 and vert_count >= 491 and vert_count <= 492 and done = '1' then green <= "111";
				elsif horz_count >= 659 and horz_count <= 660 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 668 and horz_count <= 669 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
			-- M in Game
				elsif horz_count >= 672 and horz_count <= 682 and vert_count >= 477 and vert_count <= 478 and done = '1' then green <= "111";
				elsif horz_count >= 672 and horz_count <= 673 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 677 and horz_count <= 677 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 681 and horz_count <= 682 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
			-- E in Game
				elsif horz_count >= 685 and horz_count <= 694 and vert_count >= 477 and vert_count <= 478 and done = '1' then green <= "111";
				elsif horz_count >= 685 and horz_count <= 686 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 685 and horz_count <= 690 and vert_count >= 491 and vert_count <= 492 and done = '1' then green <= "111";
				elsif horz_count >= 685 and horz_count <= 694 and vert_count >= 505 and vert_count <= 506 and done = '1' then green <= "111";
			-- O in Over
				elsif horz_count >= 699 and horz_count <= 709 and vert_count >= 477 and vert_count <= 478 and done = '1' then green <= "111";
				elsif horz_count >= 699 and horz_count <= 700 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 708 and horz_count <= 709 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 699 and horz_count <= 709 and vert_count >= 505 and vert_count <= 506 and done = '1' then green <= "111";
			-- V in Over	
				elsif horz_count >= 712 and horz_count <= 712 and vert_count >= 477 and vert_count <= 501 and done = '1' then green <= "111";
				elsif horz_count >= 713 and horz_count <= 713 and vert_count >= 477 and vert_count <= 503 and done = '1' then green <= "111";
				elsif horz_count >= 714 and horz_count <= 714 and vert_count >= 503 and vert_count <= 504 and done = '1' then green <= "111";
				elsif horz_count >= 715 and horz_count <= 715 and vert_count >= 504 and vert_count <= 505 and done = '1' then green <= "111";
				elsif horz_count >= 716 and horz_count <= 716 and vert_count >= 505 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 717 and horz_count <= 717 and vert_count >= 506 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 718 and horz_count <= 718 and vert_count >= 506 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 719 and horz_count <= 719 and vert_count >= 505 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 720 and horz_count <= 720 and vert_count >= 504 and vert_count <= 505 and done = '1' then green <= "111";
				elsif horz_count >= 721 and horz_count <= 721 and vert_count >= 503 and vert_count <= 504 and done = '1' then green <= "111";
				elsif horz_count >= 722 and horz_count <= 722 and vert_count >= 477 and vert_count <= 503 and done = '1' then green <= "111";
				elsif horz_count >= 723 and horz_count <= 723 and vert_count >= 477 and vert_count <= 502 and done = '1' then green <= "111";
			-- E in over
				elsif horz_count >= 726 and horz_count <= 735 and vert_count >= 477 and vert_count <= 478 and done = '1' then green <= "111";
				elsif horz_count >= 726 and horz_count <= 735 and vert_count >= 505 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 726 and horz_count <= 731 and vert_count >= 491 and vert_count <= 492 and done = '1' then green <= "111";
				elsif horz_count >= 726 and horz_count <= 727 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
			-- R in over
				elsif horz_count >= 738 and horz_count <= 748 and vert_count >= 477 and vert_count <= 478 and done = '1' then green <= "111";
				elsif horz_count >= 738 and horz_count <= 748 and vert_count >= 488 and vert_count <= 489 and done = '1' then green <= "111";
				elsif horz_count >= 738 and horz_count <= 739 and vert_count >= 477 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 747 and horz_count <= 748 and vert_count >= 477 and vert_count <= 489 and done = '1' then green <= "111";
				elsif horz_count >= 740 and horz_count <= 740 and vert_count >= 491 and vert_count <= 492 and done = '1' then green <= "111";
				elsif horz_count >= 741 and horz_count <= 741 and vert_count >= 492 and vert_count <= 494 and done = '1' then green <= "111";
				elsif horz_count >= 742 and horz_count <= 742 and vert_count >= 493 and vert_count <= 496 and done = '1' then green <= "111";
				elsif horz_count >= 743 and horz_count <= 743 and vert_count >= 495 and vert_count <= 498 and done = '1' then green <= "111";
				elsif horz_count >= 744 and horz_count <= 744 and vert_count >= 497 and vert_count <= 498 and done = '1' then green <= "111";
				elsif horz_count >= 745 and horz_count <= 745 and vert_count >= 498 and vert_count <= 501 and done = '1' then green <= "111";
				elsif horz_count >= 746 and horz_count <= 746 and vert_count >= 500 and vert_count <= 504 and done = '1' then green <= "111";
				elsif horz_count >= 747 and horz_count <= 747 and vert_count >= 503 and vert_count <= 506 and done = '1' then green <= "111";
				elsif horz_count >= 748 and horz_count <= 748 and vert_count >= 505 and vert_count <= 506 and done = '1' then green <= "111";
				
			-- Vert Number 7
				elsif vert_count >= 49 and vert_count <= 49 and horz_count >= 153 and horz_count <= 157 then green <= "111";
				elsif vert_count >= 49 and vert_count <= 58 and horz_count >= 157 and horz_count <= 157 then green <= "111";
			-- Vert Number 6
				elsif vert_count >= 96 and vert_count <= 104 and horz_count >= 153 and horz_count <= 153 then green <= "111";
				elsif vert_count >= 100 and vert_count <= 104 and horz_count >= 157 and horz_count <= 157 then green <= "111";
				elsif vert_count >= 100 and vert_count <= 100 and horz_count >= 153 and horz_count <= 157 then green <= "111";
				elsif vert_count >= 104 and vert_count <= 104 and horz_count >= 153 and horz_count <= 157 then green <= "111";
			-- Vert Number 5
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 147 and vert_count <= 147 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 151 and vert_count <= 151 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 155 and vert_count <= 155 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 147 and vert_count <= 151 then green <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 151 and vert_count <= 155 then green <= "111";
			-- Vert Number 4
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 198 and vert_count <= 202 then green <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 198 and vert_count <= 207 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 202 and vert_count <= 202 then green <= "111";
			-- Vert Number 3
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 249 and vert_count <= 249 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 253 and vert_count <= 253 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 257 and vert_count <= 257 then green <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 249 and vert_count <= 257 then green <= "111";
			-- Vert number 2
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 304 and vert_count <= 308 then green <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 300 and vert_count <= 304 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 300 and vert_count <= 300 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 304 and vert_count <= 304 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 308 and vert_count <= 308 then green <= "111";
			-- Vert number 1
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 351 and vert_count <= 359 then green <= "111";
			-- Vert number 0
				elsif horz_count >= 153 and horz_count <= 153 and vert_count >= 402 and vert_count <= 410 then green <= "111";
				elsif horz_count >= 157 and horz_count <= 157 and vert_count >= 402 and vert_count <= 410 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 402 and vert_count <= 402 then green <= "111";
				elsif horz_count >= 153 and horz_count <= 157 and vert_count >= 410 and vert_count <= 410 then green <= "111";
			-- Horz 6				
				elsif horz_count >= 227 and horz_count <= 227 and vert_count >= 49 and vert_count <= 57 then green <= "111";
				elsif horz_count >= 231 and horz_count <= 231 and vert_count >= 53 and vert_count <= 57 then green <= "111";
				elsif horz_count >= 227 and horz_count <= 231 and vert_count >= 53 and vert_count <= 53 then green <= "111";
				elsif horz_count >= 227 and horz_count <= 231 and vert_count >= 57 and vert_count <= 57 then green <= "111";
			-- Horz 5
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 49 and vert_count <= 49 then green <= "111";
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 53 and vert_count <= 53 then green <= "111";
				elsif horz_count >= 306 and horz_count <= 310 and vert_count >= 57 and vert_count <= 57 then green <= "111";
				elsif horz_count >= 306 and horz_count <= 306 and vert_count >= 49 and vert_count <= 53 then green <= "111";
				elsif horz_count >= 310 and horz_count <= 310 and vert_count >= 53 and vert_count <= 57 then green <= "111";
			-- Horz number 4
				elsif horz_count >= 385 and horz_count <= 385 and vert_count >= 49 and vert_count <= 53 then green <= "111";
				elsif horz_count >= 389 and horz_count <= 389 and vert_count >= 49 and vert_count <= 57 then green <= "111";
				elsif horz_count >= 385 and horz_count <= 389 and vert_count >= 53 and vert_count <= 53 then green <= "111";
			-- Horz number 3
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 49 and vert_count <= 49 then green <= "111";
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 53 and vert_count <= 53 then green <= "111";
				elsif horz_count >= 464 and horz_count <= 468 and vert_count >= 57 and vert_count <= 57 then green <= "111";
				elsif horz_count >= 468 and horz_count <= 468 and vert_count >= 49 and vert_count <= 57 then green <= "111";
			-- Horz number 2
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 49 and vert_count <= 49 then green <= "111";
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 53 and vert_count <= 53 then green <= "111";
				elsif horz_count >= 543 and horz_count <= 547 and vert_count >= 57 and vert_count <= 57 then green <= "111";
				elsif horz_count >= 547 and horz_count <= 547 and vert_count >= 49 and vert_count <= 53 then green <= "111";
				elsif horz_count >= 543 and horz_count <= 543 and vert_count >= 53 and vert_count <= 57 then green <= "111";
			-- Horz number 1
				elsif horz_count >= 626 and horz_count <= 626 and vert_count >= 49 and vert_count <= 57 then green <= "111";
			-- Horz number 0
				elsif horz_count >= 705 and horz_count <= 705 and vert_count >= 49 and vert_count <= 57 then green <= "111";
				elsif horz_count >= 701 and horz_count <= 701 and vert_count >= 49 and vert_count <= 57 then green <= "111";
				elsif horz_count >= 701 and horz_count <= 705 and vert_count >= 49 and vert_count <= 49 then green <= "111";
				elsif horz_count >= 701 and horz_count <= 705 and vert_count >= 57 and vert_count <= 57 then green <= "111";
			
				
			-- Make sure the unconvered portions of the board are Green
				elsif vert_count >= 42 and vert_count <= 445 and horz_count >= 144 and horz_count <= 785 then green <= "100";
			
			-- Otherwise No Color
				else green <= "000";
				end if;				
				
				------------------------------------
				-- Continue the scan by incrementing horizontal counter by 1
				------------------------------------
				horz_count <= horz_count + 1;			
			end if;
		end if;
		end if;
	end process;

	-- vertial scanning login, if the vinc flag is 1 then increment the 
	-- vertical counter
	process(clk50, reset)
	begin
		if(reset = '1') then
			vert_count <= (others => '0');
		elsif(rising_edge(clk50)) then
			if(clk_en = '1') then
					if vinc_flag = '1' then
					-- Rollover if 521 decimal
					if vert_count = "1000001001" then		
						vert_count <= "0000000000";
					else
						vert_count <= vert_count + 1;
					end if;
				end if;
			end if;
		end if;
	end process;

	-- Set vertical increment flag when you hit the front porch of the horizontal
	vinc_flag <= '1' when horz_count = "1100011000" else '0';
	
	-- set horizontal sync for 96 horizontal clocks (96 pixels)
	hs <= '1' when horz_count < 96 else '0';
	
	-- set vertial sync for 1 scan line
	vs <= '1' when vert_count(9 downto 1) = "000000000" else '0';
	
end Structural;
